home *** CD-ROM | disk | FTP | other *** search
- #include "generic open.h"
- #include "program globals.h"
- #include "environment.h"
- #include "error.h"
- #include "file utilities.h"
- #include "save dialog.h"
- #include "window layer.h"
- #include "pent load-save.h"
- #include "pent globals.h"
-
- void OpenTheFile(FSSpec *myFSS)
- {
- FSSpec saveFile;
- WindowRef theWindow;
- short saveResult;
- Boolean goon;
-
- switch (GetFileType(myFSS))
- {
- case SAVE_TYPE:
- goon=TRUE;
- theWindow=GetIndWindowRef(kMainWindow);
- if (theWindow!=0L)
- {
- if (gAskBeforeClosing)
- {
- saveFile=GetWindowFS(theWindow);
- if ((saveResult=DisplaySaveAlert(theWindow, (saveFile.name[0]==0x00) ?
- "\pthe game in progress" : "\pthe game", saveFile.name,
- "\popening another"))==kUserCanceled)
- {
- goon=FALSE;
- }
- }
- }
-
- if (goon)
- {
- saveFile=*myFSS;
- HandleError(GetTheFile(&saveFile), FALSE, FALSE);
- gNeedToOpenWindow=FALSE; /* not technically needed */
- }
- break;
- }
- }
-
- void PrintTheFile(FSSpec *myFSS)
- {
- #pragma unused(myFSS)
- }
-